Repository navigation
Refactor fp masks - #4246
Merged
Merged
Refactor fp masks#4246
Conversation
Contributor
miscco
approved these changes
Mar 24, 2025
|
|
||
| template <class _Tp> | ||
| inline constexpr __fp_storage_t<_Tp> __fp_sign_mask_v = __fp_sign_mask_impl<_Tp>(); | ||
| template <__fp_format _Fmt> |
Contributor
There was a problem hiding this comment.
I believe we should come up with a clear depiction of the layout of bits.
That will help users (aka us in 5 month) a lot when dealing with those bitfields
| } | ||
| _LIBCUDACXX_HIDE_FROM_ABI static constexpr type round_error() noexcept | ||
| { | ||
| return _CUDA_VSTD::__fp_from_storage<__nv_fp4_e2m1>(0x1u); |
Contributor
There was a problem hiding this comment.
I am mightily annoyed that we need that cast
Contributor
Author
There was a problem hiding this comment.
I belive we can change it to cast from a double value once we have the conversions implemented
Contributor
|
/ok to test |
Contributor
🟨 CI finished in 1h 41m: Pass: 97%/162 | Total: 4d 02h | Avg: 36m 24s | Max: 1h 28m | Hits: 41%/242144
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | libcu++ |
| CUB | |
| Thrust | |
| CUDA Experimental | |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | libcu++ |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | stdpar |
| +/- | python |
| +/- | CCCL C Parallel Library |
| +/- | Catch2Helper |
🏃 Runner counts (total jobs: 162)
| # | Runner |
|---|---|
| 113 | linux-amd64-cpu16 |
| 15 | windows-amd64-cpu16 |
| 12 | linux-arm64-cpu16 |
| 8 | linux-amd64-gpu-rtx2080-latest-1 |
| 6 | linux-amd64-gpu-rtxa6000-latest-1 |
| 5 | linux-amd64-gpu-h100-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
miscco
approved these changes
Mar 24, 2025
Contributor
|
/ok to test |
Contributor
🟩 CI finished in 1h 51m: Pass: 100%/162 | Total: 3d 18h | Avg: 33m 22s | Max: 1h 31m | Hits: 55%/253170
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | libcu++ |
| CUB | |
| Thrust | |
| CUDA Experimental | |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | libcu++ |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | stdpar |
| +/- | python |
| +/- | CCCL C Parallel Library |
| +/- | Catch2Helper |
🏃 Runner counts (total jobs: 162)
| # | Runner |
|---|---|
| 113 | linux-amd64-cpu16 |
| 15 | windows-amd64-cpu16 |
| 12 | linux-arm64-cpu16 |
| 8 | linux-amd64-gpu-rtx2080-latest-1 |
| 6 | linux-amd64-gpu-rtxa6000-latest-1 |
| 5 | linux-amd64-gpu-h100-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
caugonnet
pushed a commit
to caugonnet/cccl
that referenced
this pull request
Mar 25, 2025
caugonnet
added a commit
that referenced
this pull request
Mar 26, 2025
* Enable NVHPC in CUDASTF CI * Use nvtx_range in the POTRI example * no need to include nvtx3 anymore here * Do not use nvtx3 directly * fix compilation * WIP: try to pass the type of the execution place to the parallel_for_scope * pass the exec_place type to parallel_for_scope * remove a device annotation for a host only lambda * is_shape_of_v is not working * experiment to see if we can avoid generating device code in parallel_for with a host place * fixes for a previous conflict merge * disable an invalid test * better typing for ctx.parallel_for with a partition * use ::std and more types for parallel_for * Add transform c parallel implementation (#4048) * Enable setting _CUB_HAS_TRANSFORM_UBLKCP as flag * Stale comment * Update make_kernel_user_binary_operator to accept lhs/rhs types * Add transform c.parallel implementation * Add tests for c.parallel transform * Use launcher factory to query ptx version * Refactor how we get iterator names * Add comment explaining why we need -default-device * Address remaining review feedback * Undo change to make_iterator_kernel_arg * Restore the comment * Restore comment --------- Co-authored-by: Ashwin Srinath <shwina@users.noreply.github.com> * Drop duplicated system header blocks (#4245) Those were accidentally duplicated * Exclude sm101 from RDC testing. (#4247) * Make `cuda::stream_ref` constructible on device (#4243) * Make `cuda::stream_ref` constructible on device There is no reason we should not be able to construct it or extract the pointer out of it on device. * Pass by value * Make nvbench work * Fix logic in test_segmented_reduce (#4198) * Fix logic in test_segmented_reduce, also test over different types of offsets To resolve gh-4197, use `cupy.cumsum` to accumulate over random partition sizes to form correct offsets sequence. Add assertions to verify that `offsets` is a non-decreasing sequence, and that its last element equals the size of the input array. Perform the test for several plausible offset data types. * Changes per PR review comments 1. Use `cupy.random` to draw random sample on GPU, rather than on CPU followed by a transfer 2. Use `cp.empty` to allocate output, rather than `cp.zeros` * Add new `WarpReduce` overloadings (#3884) Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com> * Fix #4250 (#4251) * Refactor fp masks (#4246) * Implement `views::all` (#4244) * Implement `views::all` * [cudax] incorporate P3557 (constexpr completion signatures) into µstdex (#3841) * incorporate P3557 (constexpr completion signatures) into ustdex * remove the need for nvcc-specific workarounds * review feedback * tweaks to ustdex for clangd * fix typo * use concepts portability macros for C++17 support * Add fixed size segmented reduce (#3969) * Adds fixed size segmented reduce * remove unnecessary changes * revert changes * Properly deal with parallel_for overloads with grids, add an is_host() for exec_place * Remove test doing illegal things, and which is not really useful anymore --------- Co-authored-by: Ashwin Srinath <3190405+shwina@users.noreply.github.com> Co-authored-by: Ashwin Srinath <shwina@users.noreply.github.com> Co-authored-by: Michael Schellenberger Costa <miscco@nvidia.com> Co-authored-by: Allison Piper <alliepiper16@gmail.com> Co-authored-by: Oleksandr Pavlyk <21087696+oleksandr-pavlyk@users.noreply.github.com> Co-authored-by: Federico Busato <50413820+fbusato@users.noreply.github.com> Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com> Co-authored-by: David Bayer <48736217+davebayer@users.noreply.github.com> Co-authored-by: Eric Niebler <eniebler@nvidia.com> Co-authored-by: Srinivas Yadav <43375352+srinivasyadav18@users.noreply.github.com>
davebayer
added a commit
to davebayer/cccl
that referenced
this pull request
Apr 7, 2025
davebayer
added a commit
to davebayer/cccl
that referenced
this pull request
Apr 7, 2025
* Enable NVHPC in CUDASTF CI * Use nvtx_range in the POTRI example * no need to include nvtx3 anymore here * Do not use nvtx3 directly * fix compilation * WIP: try to pass the type of the execution place to the parallel_for_scope * pass the exec_place type to parallel_for_scope * remove a device annotation for a host only lambda * is_shape_of_v is not working * experiment to see if we can avoid generating device code in parallel_for with a host place * fixes for a previous conflict merge * disable an invalid test * better typing for ctx.parallel_for with a partition * use ::std and more types for parallel_for * Add transform c parallel implementation (NVIDIA#4048) * Enable setting _CUB_HAS_TRANSFORM_UBLKCP as flag * Stale comment * Update make_kernel_user_binary_operator to accept lhs/rhs types * Add transform c.parallel implementation * Add tests for c.parallel transform * Use launcher factory to query ptx version * Refactor how we get iterator names * Add comment explaining why we need -default-device * Address remaining review feedback * Undo change to make_iterator_kernel_arg * Restore the comment * Restore comment --------- Co-authored-by: Ashwin Srinath <shwina@users.noreply.github.com> * Drop duplicated system header blocks (NVIDIA#4245) Those were accidentally duplicated * Exclude sm101 from RDC testing. (NVIDIA#4247) * Make `cuda::stream_ref` constructible on device (NVIDIA#4243) * Make `cuda::stream_ref` constructible on device There is no reason we should not be able to construct it or extract the pointer out of it on device. * Pass by value * Make nvbench work * Fix logic in test_segmented_reduce (NVIDIA#4198) * Fix logic in test_segmented_reduce, also test over different types of offsets To resolve NVIDIAgh-4197, use `cupy.cumsum` to accumulate over random partition sizes to form correct offsets sequence. Add assertions to verify that `offsets` is a non-decreasing sequence, and that its last element equals the size of the input array. Perform the test for several plausible offset data types. * Changes per PR review comments 1. Use `cupy.random` to draw random sample on GPU, rather than on CPU followed by a transfer 2. Use `cp.empty` to allocate output, rather than `cp.zeros` * Add new `WarpReduce` overloadings (NVIDIA#3884) Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com> * Fix NVIDIA#4250 (NVIDIA#4251) * Refactor fp masks (NVIDIA#4246) * Implement `views::all` (NVIDIA#4244) * Implement `views::all` * [cudax] incorporate P3557 (constexpr completion signatures) into µstdex (NVIDIA#3841) * incorporate P3557 (constexpr completion signatures) into ustdex * remove the need for nvcc-specific workarounds * review feedback * tweaks to ustdex for clangd * fix typo * use concepts portability macros for C++17 support * Add fixed size segmented reduce (NVIDIA#3969) * Adds fixed size segmented reduce * remove unnecessary changes * revert changes * Properly deal with parallel_for overloads with grids, add an is_host() for exec_place * Remove test doing illegal things, and which is not really useful anymore --------- Co-authored-by: Ashwin Srinath <3190405+shwina@users.noreply.github.com> Co-authored-by: Ashwin Srinath <shwina@users.noreply.github.com> Co-authored-by: Michael Schellenberger Costa <miscco@nvidia.com> Co-authored-by: Allison Piper <alliepiper16@gmail.com> Co-authored-by: Oleksandr Pavlyk <21087696+oleksandr-pavlyk@users.noreply.github.com> Co-authored-by: Federico Busato <50413820+fbusato@users.noreply.github.com> Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com> Co-authored-by: David Bayer <48736217+davebayer@users.noreply.github.com> Co-authored-by: Eric Niebler <eniebler@nvidia.com> Co-authored-by: Srinivas Yadav <43375352+srinivasyadav18@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors fp masks.
trait_vfor fp format traits (properties) andtrait_of_vfor fp types traits (properties)__fp_from_storage